<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<link rel="stylesheet" href="./css/index.css">

<body>
    <div id="app">
        <y-select :select-data.sync="list" :select-config="config"></y-select>
    </div>
</body>

</html>
<script src="./js/vue.min.js"></script>
<script src="./js/select.js"></script>
<script>
    var app = new Vue({
        el: '#app',
        props: {


        },
        data: function() {
            return {
                list: [{
                    label: '一级 1',
                    value: 1,
                    children: [{
                        label: '二级 1-1',
                        value: 11,
                        children: [{
                            label: '三级 1-1-1',
                            value: 111
                        }]
                    }]
                }, {
                    label: '一级 2',
                    value: 2,
                    children: [{
                        label: '二级 2-1',
                        value: 22,
                        children: [{
                            label: '三级 2-1-1',
                            value: 222
                        }]
                    }, {
                        label: '二级 2-2',
                        value: 23,
                        children: [{
                            label: '三级 2-2-1',
                            value: 232
                        }]
                    }]
                }, {
                    label: '一级 3',
                    value: 3,
                    children: [{
                        label: '二级 3-1',
                        value: 33,
                        children: [{
                            label: '三级 3-1-1',
                            value: 333
                        }]
                    }, {
                        label: '二级 3-2',
                        value: 34,
                        children: [{
                            label: '三级 3-2-1',
                            value: 343
                        }]
                    }]
                }],
                config: {
                    // 显示字段
                    labelName: 'label',
                    // 绑定值
                    valueName: 'value',
                    // 树列表
                    children: 'children',
                    placeholder: '请选择',
                    // key绑定字段
                    key: 'value',
                    // 默认显示字段
                    label: '',
                    // 默认显示值
                    value: '',
                    // 类型 tree  default
                    type: 'tree',
                    // 是否可清空
                    clearable: false,
                    // 是否可搜索
                    search: true,
                    // 点击样式
                    clickNumbel: null
                }
            }
        },
        created: function() {},
        mounted: function() {


        },
        computed: {},
        watch: {

        },
        methods: {

        }
    })
</script>